package com.ruoyi.client.service.impl;

import com.ruoyi.client.domain.Commission;
import com.ruoyi.client.mapper.CommissionMapper;
import com.ruoyi.client.service.ICommissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommissionServiceImpl implements ICommissionService {
    @Autowired
    private CommissionMapper commissionMapper;
    @Override
    public Commission getCommissionBySymbolAndPrice(String symbol, String buyPrice, Integer id) {
        return commissionMapper.getCommissionBySymbolAndPrice(symbol,buyPrice,id);
    }

    @Override
    public void add(Commission commission) {
        commissionMapper.add(commission);
    }

    @Override
    public void updateNumById(Integer num, Integer id) {
        commissionMapper.updateNumById(num,id);
    }

    @Override
    public Commission getCommissionBySymbolAndPriceSell(String symbol, String buyPrice, Integer id) {
        return commissionMapper.getCommissionBySymbolAndPriceSell(symbol,buyPrice,id);
    }

    @Override
    public List<Commission> entrustAllList(Long userId) {
        return commissionMapper.entrustAllList(userId);
    }
}
